/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package queenb.net.entitybean;

/**
 * @author  : linhlv
 * @package : queenb.net.entitybean
 * @file    : SimpleObject.javas
 * @created : Oct 4, 2010
 * @purpose :
 */
import java.io.Serializable;
import queenb.net.annotation.Mapping;
import oracle.jdbc.OracleTypes;
import queenb.net.datacontrol.DataControl;
import queenb.web.util.Util;
public class SimpleObject  extends DataControl<SimpleObject> implements Serializable {
    @Mapping(name = "val", typeMapping   = OracleTypes.OTHER)
    private Object val;
    @Mapping(name = "val2", typeMapping   = OracleTypes.OTHER)
    private Object val2;
    @Mapping(name = "label", typeMapping = OracleTypes.CHAR)
    private String label;
    @Mapping(name = "qv301", typeMapping = OracleTypes.CHAR)
    private String qv301;
    @Mapping(name = "qv302", typeMapping = OracleTypes.CHAR)
    private String qv302;
    @Mapping(name = "pq300", typeMapping = OracleTypes.INTEGER)
    private int pq300;

    /**
     * @return the val
     */
    public Object getVal() {
        return val;
    }
    public String fullText(){
        return getVal()+" "+ getLabel();
    }

    /**
     * @param val the val to set
     */
    public void setVal(Object val) {
        this.val = val;
    }

    /**
     * @return the label
     */
    public String getLabel() {
        return label;
    }

    /**
     * @param label the label to set
     */
    public void setLabel(String label) {
        this.label = label;
    }

    @Override
    public String toString() {
        return label;
    }

    public int getIntVal(){
        return Util.parseInt(val);
    }

    /**
     * @return the val2
     */
    public Object getVal2() {
        return val2;
    }

    /**
     * @param val2 the val2 to set
     */
    public void setVal2(Object val2) {
        this.val2 = val2;
    }

    /**
     * @return the qv301
     */
    public String getQv301() {
        return qv301;
    }

    /**
     * @param qv301 the qv301 to set
     */
    public void setQv301(String qv301) {
        this.qv301 = qv301;
    }

    /**
     * @return the qv302
     */
    public String getQv302() {
        return qv302;
    }

    /**
     * @param qv302 the qv302 to set
     */
    public void setQv302(String qv302) {
        this.qv302 = qv302;
    }

    /**
     * @return the pq300
     */
    public int getPq300() {
        return pq300;
    }

    /**
     * @param pq300 the pq300 to set
     */
    public void setPq300(int pq300) {
        this.pq300 = pq300;
    }
}
